package com.ren;

import com.ren.frame.MainFrame;
import javafx.application.Application;
import javafx.stage.Stage;

import javax.swing.*;

public class HelloApplication extends Application {
    @Override
    public void start(Stage stage) {
        stage.hide();

        // 在Swing事件调度线程中启动MainFrame
        SwingUtilities.invokeLater(() -> {
            try {
                // 设置系统外观
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            } catch (Exception e) {
                e.printStackTrace();
            }

            // 创建并显示MainFrame
            MainFrame mainFrame = new MainFrame();
            mainFrame.setVisible(true);
        });
    }

    public static void main(String[] args) {
        launch();
    }
}
